interface Customer{
    custname: string
    buymoney: number
}


type Custm = (params: Customer) => string

type CustParaType = Custm extends (params: infer P) => string ? P : Custm

interface k {
    name: string
    age: number
    get: () => CustParaType
}


type C = (params: string) => k

type ValType = C extends (props: string) => infer P ? P : C


type f = (p: Customer) => k
type returnValueType<T> = T extends (p: any) => infer H ? H : never

type QueryRes = returnValueType<f>


const d: ValType = {
    name: 'zs',
    age: 12,
    get: () => {
        return {
            custname: 'zhagnsan',
            buymoney: 123
        }
    }
}

console.log(d)



